/* ============================================================
   ReTxt2tags, a stylesheet displaying HTML text as if it were
   plain Txt2tags text. 
   — Eric Forgeot, derived from the work of Florent Verschelde (fvsch.com)
   on ReMarkdown (http://fvsch.com/code/remarkdown/)
   License: This file is published under the Do What The Fuck
            You Want To Public License (WTFPL), Version 2.
   ============================================================ */

/* --- HOW TO USE --- */

/* Add the `rt2t-on` class to an element which contains your article. It could
   be the BODY element, or an ARTICLE element, or a DIV.

*/

/* --- PAGE LAYOUT - OPTIONAL --- */
/* Uncomment if you're using this stylesheet with no other CSS,
   and want a basic page layout. */
/*
@media screen {
  html { font-size: 13px; }
  body {
    max-width: 45em; margin: 0; padding: 2em 3em 4em 9em;
    font-size: 100%; color: #222; background: white;
  }
}
@media screen and (max-width:40em) {
  body { max-width: none; padding: 2em; }
}
@media print {
  body { font-size: 10pt; }
}
*/

/* --- COMMON TEXT STYLES --- */

.rt2t-on {
  /* Better results with a monospace font, obviously. Feel free to pick
     a Courier-based font stack, or a custom Web Font if you want. */
  font-family: Monaco, "DejaVu Sans Mono", "Lucida Console", monospace;
  /* To maintain a good vertical rhythm, the value for the text's line-height
     is used throughout the stylesheet for top and bottom margins of elements.
     E.g. if we have a line-height of 1.5 (or 1.5em or 150%), we should have
     top and bottom margins of n × 1.5em. */
  line-height: 1.4;
}

/* --- TITLES --- */

/* Titles - common styles */
.rt2t-on h1,
.rt2t-on h2,
.rt2t-on h3,
.rt2t-on h4,
.rt2t-on h5,
.rt2t-on h6 {
  margin: 1.4em 0;
  font-weight: normal;
  font-size: 100%;
}

/* Titles - with `#` prefixes (default for all titles) */
.rt2t-on h1:before{
  content: "= ";
}
.rt2t-on h1:after{
  content: " =";
}
.rt2t-on h2:before{
  content: "== ";
}
.rt2t-on h2:after{
  content: " ==";
}
.rt2t-on h3:before{
  content: "=== ";
}
.rt2t-on h3:after {
  content: " ===";
}
.rt2t-on h4:before {
  content: "==== ";
}
.rt2t-on h4:after {
  content: " ====";
}
.rt2t-on h5:before {
  content: "===== ";
}
.rt2t-on h5:after {
  content: " ======";
}


/* Titles - option for H1 */
.rt2t-h1-uppercase h1, h1.rt2t-uppercase {
  text-transform: uppercase;
}

/* --- PARAGRAPHS AND INLINE CONTENT --- */

/* Paragraphs */
.rt2t-on p {
  margin: 1.4em 0;
}

/* Emphasis */
.rt2t-on b,
.rt2t-on u,
.rt2t-on i,
.rt2t-on s,
.rt2t-on em,
.rt2t-on strong{
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-decoration: none;
}
.rt2t-on i:before, .rt2t-on em:before, 
.rt2t-on i:after, .rt2t-on em:after {
  content: "//";
}
.rt2t-on u:before, .rt2t-on strong:before
.rt2t-on u:after, .rt2t-on strong:after {
  content: "__";
}
.rt2t-on strong:before, .rt2t-on b:before, 
.rt2t-on strong:after, .rt2t-on b:after, {
  content: "**";
}


.rt2t-on s:before,
.rt2t-on s:after {
  content: "--";
}

/* Options for links */
.rt2t-on a:before, a.rt2t-on:before,
.rmd-a-showurl a[href]:before, a[href].rmd-showurl:before {
  content: "[";
}
.rt2t-on a:after, a.rt2t-on:after {
  content: "]";
}
.rmd-a-showurl a[href]:after, a[href].rmd-showurl:after {
  content: "](" attr(href) ")";
}

.rt2t-on a[href]:before, a[href].rt2t-on:before {
    content: "[";
}

/* Show URLs after the link */
.rt2t-on a[href]:after, a[href].rt2t-on:after {
    content: " " attr(href) "]";
}

/* Print URLs after the link */
@media print {
  .rt2t-on a[href]:before, a[href].rt2t-on:before {
    content: "[";
  }
  .rt2t-on a[href]:after, a[href].rt2t-on:after {
    content: "](" attr(href) ")";
  }
}
/* Print list of URLs at end of section -- requires a JS script */
@media print {
  .rmd-a-printref a[data-rmd-linkref]:before {
    content: "[";
  }
  .rmd-a-printref a[data-rmd-linkref]:after {
    content: "][" attr(data-rmd-linkref) "]";
  }
  .rmd-a-printref .rmd-references {
    color: #555;
    margin-left: 3em;
    margin-left: 5ch;
  }
  .rmd-a-printref .rmd-references > li:before {
    content: "[" attr(data-rmd-linknum) "]:";
    margin-left: -3em;
    margin-left: -5ch;
  }
}
@media screen {
  .rmd-a-printref .rmd-references {display: none;}
}
/* Remove underline when we’re using Txt2tags-style brackets */
.rmd-a-bracket a, a.rmd-bracket {
  text-decoration: none;
}
@media print {
  .rmd-a-showurl a, a.rmd-showurl,
  .rmd-a-printurl a, a.rmd-printurl,
  .rmd-a-printref a[data-rmd-linkref] {
    text-decoration: none;
  }
}

/* --- LISTS --- */

/* Common */
.rt2t-on ul,
.rt2t-on ol {
  /*margin: 1.4em 0;*/
  padding: 0;
  list-style: none;
}

/* Ordered lists (with options for bullets) */
.rt2t-on ul {
  margin-left: 0.4em;
  margin-left: 2ch;
}
.rt2t-on ul > li:before {
  float: left;
  margin-left: -0.4em;
  margin-left: -2ch;
}
.rt2t-on ul > li:before, .rmd-ul-star ul > li:before, ul.rmd-star > li:before {
  content: "-";
}
.rmd-ul-plus ul > li:before, ul.rmd-plus > li:before {
  content: "+";
}


/* Ordered lists (with generated counter) */
.rt2t-on ol {
  margin-left: 0.4em;
  margin-left: 2ch;
  counter-reset: item;
}
.rt2t-on ol > li {
  counter-increment: item;
}
.rt2t-on ol > li:before {
  float: left;
  margin-left: -0.4em;
  margin-left: -2ch;
  margin-right: 1ch;
  content: "+";
}

/* Definition list */
.rt2t-on dt:before {
  margin-left: 0.4em;
  margin-left: 0ch;
  content: ":";
}

.rt2t-on dt > li:before {
  float: left;
  margin-left: -0.4em;
  margin-left: -2ch;
  margin-right: 1ch;
  content: "-";
}

/* --- QUOTATIONS --- */

.rt2t-on block {
  position: relative;
  overflow: hidden;
  margin: 1.4em 0;
  padding: 0 0 0 1.8em;
  padding-left: 3ch;
}
.rt2t-on blockquote:before {
  position: absolute;
  top: 0; left: 0;
  white-space: pre;
  content: "    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A"
  "    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A"
  "    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A"
  "    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A    \A";
}
.rt2t-on blockquote > *:first-child {
  margin-top: 0;
}
.rt2t-on blockquote > *:last-child {
  margin-bottom: 0;
}

/* --- CODE (INLINE AND BLOCKS) --- */

.rt2t-on pre,
.rt2t-on code {
  font-family: inherit;
}
.rt2t-on pre {
  margin: 1.4em 0 1.4em 2.4em;
  margin-left: 0ch;
  -o-tab-size: 4;
  -moz-tab-size: 4;
  tab-size: 4;
}
.rt2t-on pre:before{
  content: 
  "```"
  "\A"
  ;
}

.rt2t-on pre:after{
  content: 
  "\A"
  "```"
  ;
}

.rt2t-on code:before,
.rt2t-on code:after {
  content: "``";
}
.rt2t-on pre code:before,
.rt2t-on pre code:after {
  content: "";
}

/* --- HORIZONTAL RULES --- */

.rt2t-on hr {
  height: 1.4em;
  margin: 2.8em 0;
  border: none;
  line-height: 1.4em;
  color: inherit;
}
.rt2t-on hr:before, .rmd-hr-star hr:before, hr.rmd-star:before {
  content: "--------------------";
  position: relative;
  top: .25em;
}
.rmd-hr-minus hr:before, hr.rmd-minus:before {
  content: "-------";
  top: 0;
}
.rmd-hr-center hr, hr.rmd-center {
  text-align: center;
}

/* --- TABLES --- */

.rt2t-on tr > th:before {
  margin-left: 0.0em;
  margin-left: 0ch;
  content: " | ";
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
}


.rt2t-on th:before {
  margin-left: 0.0em;
  margin-left: 0ch;
  content: "";
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
}

.rt2t-on td:before {
  margin-left: 0.0em;
  margin-left: 0ch;
  content: " | ";
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
}

.rt2t-on tr:after {
  margin-left: 0.0em;
  margin-left: 0ch;
  content: "|";  
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
}
